﻿//This is a cmocean colormap
//All credit to Kristen Thyng
//This colormap is under the MIT License
//All cmocean colormaps are available at https://github.com/matplotlib/cmocean/tree/master/cmocean/rgb

namespace ScottPlot.Drawing.Colormaps
{
    public class Dense : IColormap
    {
        public string Name => "Dense";

        public (byte r, byte g, byte b) GetRGB(byte value) =>
            (cmaplocal[value, 0], cmaplocal[value, 1], cmaplocal[value, 2]);

        private static readonly byte[,] cmaplocal = {
            { 230, 241, 241 },
            { 228, 240, 240 },
            { 227, 239, 239 },
            { 225, 238, 239 },
            { 223, 237, 238 },
            { 221, 237, 237 },
            { 220, 236, 237 },
            { 218, 235, 236 },
            { 216, 234, 236 },
            { 215, 233, 235 },
            { 213, 233, 235 },
            { 211, 232, 234 },
            { 209, 231, 234 },
            { 208, 230, 233 },
            { 206, 229, 233 },
            { 204, 228, 232 },
            { 203, 228, 232 },
            { 201, 227, 232 },
            { 199, 226, 231 },
            { 198, 225, 231 },
            { 196, 224, 230 },
            { 194, 223, 230 },
            { 193, 223, 230 },
            { 191, 222, 230 },
            { 190, 221, 229 },
            { 188, 220, 229 },
            { 186, 219, 229 },
            { 185, 218, 228 },
            { 183, 218, 228 },
            { 182, 217, 228 },
            { 180, 216, 228 },
            { 178, 215, 228 },
            { 177, 214, 227 },
            { 175, 213, 227 },
            { 174, 212, 227 },
            { 172, 212, 227 },
            { 171, 211, 227 },
            { 169, 210, 227 },
            { 168, 209, 227 },
            { 166, 208, 227 },
            { 165, 207, 226 },
            { 163, 206, 226 },
            { 162, 206, 226 },
            { 160, 205, 226 },
            { 159, 204, 226 },
            { 158, 203, 226 },
            { 156, 202, 226 },
            { 155, 201, 226 },
            { 154, 200, 226 },
            { 152, 199, 226 },
            { 151, 198, 226 },
            { 150, 197, 226 },
            { 148, 197, 226 },
            { 147, 196, 226 },
            { 146, 195, 226 },
            { 144, 194, 226 },
            { 143, 193, 226 },
            { 142, 192, 226 },
            { 141, 191, 226 },
            { 140, 190, 226 },
            { 138, 189, 227 },
            { 137, 188, 227 },
            { 136, 187, 227 },
            { 135, 186, 227 },
            { 134, 185, 227 },
            { 133, 184, 227 },
            { 132, 183, 227 },
            { 131, 182, 227 },
            { 130, 181, 227 },
            { 129, 180, 227 },
            { 128, 179, 227 },
            { 127, 178, 227 },
            { 127, 177, 228 },
            { 126, 176, 228 },
            { 125, 175, 228 },
            { 124, 174, 228 },
            { 123, 173, 228 },
            { 123, 172, 228 },
            { 122, 171, 228 },
            { 121, 170, 228 },
            { 121, 169, 228 },
            { 120, 168, 228 },
            { 120, 167, 228 },
            { 119, 166, 228 },
            { 119, 165, 228 },
            { 118, 164, 229 },
            { 118, 163, 229 },
            { 117, 161, 229 },
            { 117, 160, 229 },
            { 117, 159, 229 },
            { 117, 158, 229 },
            { 116, 157, 229 },
            { 116, 156, 228 },
            { 116, 155, 228 },
            { 116, 154, 228 },
            { 116, 152, 228 },
            { 115, 151, 228 },
            { 115, 150, 228 },
            { 115, 149, 228 },
            { 115, 148, 228 },
            { 115, 147, 227 },
            { 115, 145, 227 },
            { 115, 144, 227 },
            { 115, 143, 227 },
            { 115, 142, 226 },
            { 116, 141, 226 },
            { 116, 139, 226 },
            { 116, 138, 226 },
            { 116, 137, 225 },
            { 116, 136, 225 },
            { 116, 135, 224 },
            { 116, 133, 224 },
            { 117, 132, 223 },
            { 117, 131, 223 },
            { 117, 130, 222 },
            { 117, 129, 222 },
            { 117, 127, 221 },
            { 117, 126, 221 },
            { 118, 125, 220 },
            { 118, 124, 220 },
            { 118, 123, 219 },
            { 118, 121, 218 },
            { 118, 120, 218 },
            { 119, 119, 217 },
            { 119, 118, 216 },
            { 119, 117, 215 },
            { 119, 115, 215 },
            { 119, 114, 214 },
            { 120, 113, 213 },
            { 120, 112, 212 },
            { 120, 111, 211 },
            { 120, 110, 210 },
            { 120, 108, 210 },
            { 120, 107, 209 },
            { 120, 106, 208 },
            { 121, 105, 207 },
            { 121, 104, 206 },
            { 121, 102, 205 },
            { 121, 101, 204 },
            { 121, 100, 203 },
            { 121, 99, 202 },
            { 121, 98, 201 },
            { 121, 97, 200 },
            { 121, 96, 199 },
            { 121, 94, 197 },
            { 121, 93, 196 },
            { 121, 92, 195 },
            { 121, 91, 194 },
            { 121, 90, 193 },
            { 121, 89, 192 },
            { 121, 88, 191 },
            { 121, 87, 189 },
            { 121, 86, 188 },
            { 121, 84, 187 },
            { 121, 83, 186 },
            { 121, 82, 184 },
            { 121, 81, 183 },
            { 121, 80, 182 },
            { 121, 79, 181 },
            { 120, 78, 179 },
            { 120, 77, 178 },
            { 120, 76, 177 },
            { 120, 75, 175 },
            { 120, 74, 174 },
            { 120, 73, 173 },
            { 119, 72, 171 },
            { 119, 71, 170 },
            { 119, 70, 169 },
            { 119, 69, 167 },
            { 119, 67, 166 },
            { 118, 66, 165 },
            { 118, 65, 163 },
            { 118, 64, 162 },
            { 118, 63, 160 },
            { 117, 62, 159 },
            { 117, 61, 157 },
            { 117, 60, 156 },
            { 116, 59, 155 },
            { 116, 59, 153 },
            { 116, 58, 152 },
            { 115, 57, 150 },
            { 115, 56, 149 },
            { 115, 55, 147 },
            { 114, 54, 146 },
            { 114, 53, 144 },
            { 114, 52, 143 },
            { 113, 51, 141 },
            { 113, 50, 140 },
            { 112, 49, 138 },
            { 112, 48, 136 },
            { 111, 47, 135 },
            { 111, 46, 133 },
            { 110, 45, 132 },
            { 110, 45, 130 },
            { 109, 44, 129 },
            { 109, 43, 127 },
            { 108, 42, 126 },
            { 108, 41, 124 },
            { 107, 40, 122 },
            { 107, 40, 121 },
            { 106, 39, 119 },
            { 106, 38, 117 },
            { 105, 37, 116 },
            { 104, 36, 114 },
            { 104, 36, 113 },
            { 103, 35, 111 },
            { 103, 34, 109 },
            { 102, 33, 108 },
            { 101, 33, 106 },
            { 101, 32, 104 },
            { 100, 31, 103 },
            { 99, 31, 101 },
            { 98, 30, 99 },
            { 98, 29, 98 },
            { 97, 29, 96 },
            { 96, 28, 94 },
            { 95, 27, 93 },
            { 95, 27, 91 },
            { 94, 26, 89 },
            { 93, 26, 88 },
            { 92, 25, 86 },
            { 91, 25, 84 },
            { 90, 24, 83 },
            { 90, 24, 81 },
            { 89, 23, 80 },
            { 88, 23, 78 },
            { 87, 22, 76 },
            { 86, 22, 75 },
            { 85, 22, 73 },
            { 84, 21, 72 },
            { 83, 21, 70 },
            { 82, 21, 68 },
            { 81, 20, 67 },
            { 80, 20, 65 },
            { 79, 20, 64 },
            { 78, 19, 62 },
            { 77, 19, 61 },
            { 75, 19, 59 },
            { 74, 19, 58 },
            { 73, 18, 56 },
            { 72, 18, 55 },
            { 71, 18, 54 },
            { 70, 18, 52 },
            { 69, 17, 51 },
            { 68, 17, 50 },
            { 66, 17, 48 },
            { 65, 17, 47 },
            { 64, 16, 46 },
            { 63, 16, 45 },
            { 62, 16, 43 },
            { 60, 16, 42 },
            { 59, 15, 41 },
            { 58, 15, 40 },
            { 57, 15, 39 },
            { 56, 15, 37 },
            { 54, 14, 36 }

        };
    }
}

